
include( "shared.lua" );

function ENT:Draw()

	local owner = self:GetNWEntity( "Parent" );

	if( not owner or not owner:IsValid() or not owner:Alive() ) then return; end

	if( self:GetModel() == "models/props_junk/garbage_bag001a.mdl" ) then
	
		local attachment = owner:LookupAttachment( "chest" );
		attachment = owner:GetAttachment( attachment );
	
		self:SetAngles( attachment.Ang + Angle( 90, 0, 0 ) );
		self:SetPos( attachment.Pos + owner:GetForward() * -5 );
		self:SetColor( 50, 50, 50, 255 );
		
	else
	
		local attachment = owner:LookupAttachment( "anim_attachment_RH" );
		attachment = owner:GetAttachment( attachment );
	
		self:SetPos( attachment.Pos );
		self:SetAngles( owner:GetAngles() );
		
	end
	
	

	self:DrawModel();
	
end